<template>
  <div>
    <canvas ref="canvas" />
    <button @click="btnClick">生成二维码</button>
  </div>
</template>
<script>
import Qrcode from 'qrcode'
export default {
  methods: {
    btnClick() {
      Qrcode.toCanvas(this.$refs.canvas, 'http://localhost:8888/#/employees', {
        width: 200,
        height: 200
      })
    }
  }
}
</script>
<style></style>
